import { http } from "../utils/request.js";

export function getBanner(){
    return http('/api/bannerList','get')
}
export function getNewShop(){
    return http('/api/goods/is_new/1','get')
}
export function getRecommend(){
    return http('/api/goods/is_recommend/1','get')
}
export function getInfo(id){
    return http(`/api/goods/detail/${id}`,'get')
}
export function getIpadList(obj){
    return http(`/api/goods/getMenuGoodsList/${obj.page}/${obj.id}`,'get')
}
export function getsearch(value){
    return http(`/api/goods/search/1/${value}`,'get')
}
export function getLogin(phone){
    return http(`/api/login?phone=${phone}`,'post')
}
export function getCart(id){
    return http(`/api/getCartList?member_id=${id}`,'get')
}
export function addCart(obj){
    return http(`/api/addcart?goods_id=${obj.goods_id}&goods_name=${obj.goods_name}&price=${obj.price}&number=${obj.number}&goods_img=${obj.goods_img}&remark=${obj.remark}&member_id=${obj.member_id}`,'post')
}
export function delCart(id){
    return http(`/api/deletecart?id=${id}`,'get')
}
export function clearCart(id){
    return http(`/api/clearcart?member_id=${id}`,'get')
}